class Animal(object):
    age = 5
    def eat(self,food):
        print(f"正在{food}")

    def play(self):
        print("正在玩耍")

    def sleep(self):
        print("正在睡觉")

Animal.age = 8
dog = Animal()
# dog.eat("狗粮")
# dog.play()
# dog.sleep()
dog.age = 10
print(f'dog的age是{dog.age}')

pig = Animal()
print(f'pig的age是{pig.age}')
print(f'Animal的age是{Animal.age}')